﻿@model ZKEACMS.Article.ViewModel.ArticleListWidgetViewModel
@{
    if (!Model.Widget.DetailPageUrl.IsNullOrEmpty())
    {
        Model.Widget.DetailPageUrl = Url.Content(Model.Widget.DetailPageUrl);
    }
}
<div class="article-list">
    @if (Model.Articles != null)
    {
        <ul class="media-list">
            @foreach (var item in Model.Articles)
            {
                <li class="media">
                    <div class="media-left">
                        <a target="_blank" href="@Url.PostUrl(Model.Widget.DetailPageUrl,item)">
                            <img class="media-object" src="@Url.ImageContent(item.ImageThumbUrl)" alt="@item.Title">
                        </a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading">
                            <a target="_blank" href="@Url.PostUrl(Model.Widget.DetailPageUrl,item)">
                                @item.Title
                            </a>
                        </h4>
                        @item.Summary
                    </div>
                </li>
            }
        </ul>
        @if (Model.IsPageable)
        {
            Html.Pagin(Model.Pagin);
        }
    }
</div>